#include <iostream>
#include<string.h>
using namespace std;

int main()
{
    char m[1005],n[1005];
    int a[1005]={0},b[1005]={0},c[1005]={0},k=0;
    int len_m,len_n,len_c;
    scanf("%s %s",&m,&n);
    len_m = strlen(m);
    len_n = strlen(n);
    for(int i=0;i<len_m;i++)
        a[i] = m[len_m-1-i] - '0';
    for(int i=0;i<len_n;i++)
        b[i] = n[len_n-1-i] - '0';
    int Max = len_m;
    if(len_m <len_n)
        Max = len_n;
    for(int i=0;i<Max;i++){
        c[i] = ( a[i]+b[i]+k ) % 10;
        k = ( a[i]+b[i]+k ) / 10;
    }
    if(k!=0){
        c[Max] = k;
        Max++;
    }
    for(int i=Max-1;i>=0;i--)
        cout<<c[i];

    return 0;
}
